using System;
using System.Collections.Generic;
using System.Text;

namespace Tomahawk.Runtime.Logic
{
    /// <summary>
    /// This class represents a controllar that operates in the same machine than the pawns
    /// </summary>
    public abstract class XLocalController : XController
    {
    
        /// <summary>
        /// Locally sends a command into a pawn
        /// </summary>
        public override void SendCommand(XPawn.PawnCommand command)
        {
            if (this.ControlledPawn != null)
            {
                this.ControlledPawn.ReceiveCommand(command);
            }
            else
            {
                throw new NoPawnAsignedException(command);
            }
        }

    }

}
